<?php include('brandheader.php');?>
<!--主体内容-->
<div class="main brand_favorites">

	<div id="topliclistItems">
		<?php foreach($myfav as $myfav){  ?>
		<dl class="topic">
        	<dt><a href="###"><img src="images/brand/<?php echo $myfav['pic']; ?>" class="imgh2" /></a></dt>
            <dd><a href="index.php?mod=brandindex&code=detail&ids=<?php echo $myfav['id'];?>"><b><?php echo $myfav['tobacco_name']; ?></b>: <?php echo $myfav['intro']; ?></a></dd>
            <dd class="fav"><a onclick="recommend('<?php echo $myfav['uid'];?>','<?php echo $myfav['id'];?>');">推荐</a><a href="index.php?mod=brandindex&code=detail&comm=1&ids=<?php echo $myfav['id'];?>">评论</a><a onclick="delfav('<?php echo $myfav['uid'];?>','<?php echo $myfav['favid'];?>');">取消收藏</a></dd>
        </dl>
		<?php }?>
	</div>
</div>
<script type="text/javascript">

$(function(){

	  
	var $container = $('#topliclistItems');

	$container.imagesLoaded( function(){
	  $container.masonry({
        itemSelector : '.topic',
		columnWidth: function( containerWidth ) {
			return containerWidth / 4;
		}
	  });
	});
});


	function recommend(uid,id){
		$.ajax({
			url: 'index.php?mod=brandindex&code=nav',
			data: 'uid='+uid+'&id='+id,
			success: function(d){
				art.dialog({
					title: '提示', 
					content: "<b class='notice'>"+d+"</b>",
					width: 180,fixed: true,time: 1000
				})		
			}	
		});
	}
	function delfav(uid,id){
		$.ajax({
			url: 'index.php?mod=brandindex&code=favorite',
			data: 'uid='+uid+'&favid='+id,
			success: function(d){
				art.dialog({
					title: '提示', 
					content: "<b class='notice'>"+d+"</b>",
					width: 180,fixed: true,time: 1000
				})		
			}	
		});
	}
</script>
<!--底部-->
<div class="footer">
<div class="link"><a href="#">关于</a> <a href="#">开放平台</a> <a href="#">公共主页</a> <a href="#">帮助中心</a> <a href="#">聚友客服</a></div>
<div class="c">西安聚友科技发展有限公司 <a href="#">陕ICP备案[2009]169号</a>  <a href="#">陕公网安备110000000009号</a>  文化部监督电子邮箱：juyou@vip.sina.com</div>
</div>
</body>
</html>
